home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 261 / SOMC Family Forum 261.iso / Xtras / Animation Wizard.dir / 00012_Script_Function < prev    next >
Text File  |  1997-05-10  |  1KB  |  41 lines

  1. -- Function script
  2.  
  3. property iFunctionNameList
  4. property ioFunctionList
  5. property iCurrentFunction
  6. property ichTabs
  7.  
  8. on birth me
  9.   global goBanners
  10.   global goZooms
  11.   global goCredits
  12.   global goBullets
  13.   
  14.   set iFunctionNameList = ["Banners", "Zooms", "Credits", "Bullets"]
  15.   set ioFunctionList = [goBanners, goZooms, goCredits, goBullets]
  16.   set iCurrentFunction = 1
  17.   set ichTabs = 2
  18.   return me
  19. end birth
  20.  
  21.  
  22.  
  23. on mHit me
  24.   global goPlatform
  25.   set newFunction = HitWhoH(ichTabs, count(iFunctionNameList))
  26.   if newFunction = iCurrentFunction then
  27.     return  -- clicked on the current function, don't do anything
  28.   end if
  29.   
  30.   -- Send the current object a clean up message to say we're done with it
  31.   set oCurrent = getAt(ioFunctionList, iCurrentFunction)
  32.   mCleanup(oCurrent)
  33.   
  34.   -- Finally, go to the appropriate frame of the new function
  35.   set iCurrentFunction = newFunction
  36.   set newFrameName = getAt(iFunctionNameList, iCurrentFunction)
  37.   go to frame (newFrameName & goPlatform)
  38.   
  39. end mHit
  40.  
  41.